package edu.westga.vocalengineer.audio.transforms;

/**
 * ReverseTransform
 *   Implements a very simple reversal transformation.
 * @author mfarmer2
 *
 */
public class ReverseTransform implements ITransform {

	/**
	 * Applies a reversal transform to samples, returning the result.
	 */
	@Override
	public short[] execute(short[] samples) {
		short[] filtered = new short[samples.length];
		for(int i = 0; i < samples.length; i++) {
			filtered[samples.length - (i + 1)] = samples[i];
		}
		return filtered;		
	}

}
